@Repository
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th=
        "http://www.thymeleaf.org" lang="en">
<head th:replace="fragments/header :: head">
</head>
<body>
<div class="container">
    <h3 class="text-center">新增图书</h3>
    <div class="row justify-content-center">
        <div class="col-6">
            <form name="bookForm" role="form" method="post" th:object=
                    "${bookForm}" th:action="@{/books/add}" enctype="multipart/form-
data">
                <div class="form-group">
                    <label class="form-control-label" for="field_bookTitle">图书名称</label>
                    <input type="text" class="form-control" name="bookName" id=
                            "field_bookname" required th:field="*{bookName}"/>
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_bookAuthor">图书作者</label>
                    <input type="text" class="form-control" name="bookAuthor" id=
                            "field_author" required th:field="*{bookAuthor}"/>
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_bookPages">出版社</label>
                    <input type="text" class="form-control" name="bookPublisher" id=
                            "field_publisher" required
                           th:field="*{bookPublisher}"/>
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_bookIsbn">图书
                        ISBN</label>
                    <input type="text" class="form-control" name="bookIsbn" id=
                            "field_isbn" required th:field="*{bookIsbn}"/>
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_bookPrice">图书价格
                    </label>
                    <input type="number" class="form-control" name="bookPrice" id=
                            "field_price" required th:field="*{bookPrice}"/>
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_bookDescription">图书简介
                    </label>
                    <textarea class="form-control" name="bookDescription" id=
                            "field_description" required th:field="*{bookDescription}"></textarea>
                    /div>
                    iv class="form-group">
                    bel class="form-control-label" for="field_bookImage">Book Image</label>
                    <div>
                        <img th:if="${edit}" height="100px"
                             th:src="@{|/bookImage?bookId=${bookForm.bookId}|}"/>
                        nput type="file" class="form-control" name="bookImage" id= field_image"
                        th:field="*{bookImage}" accept="image/*"/></div>
                    iv>
                    div class = "col-12 text-right">
                    <a type="button" class="btn btn-secondary" th:href="@{/books}">
                        返回</a>
                    <button type="submit" class="btn btn-primary">新增
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>